package galatea;

import java.awt.Color;
import java.awt.Point;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;

import javax.swing.JLabel;

public class ListObject extends JLabel implements MouseListener{
	String input;
	String output;
	String desc;
	String code;
	boolean dragging = false;
	boolean justPressed = false;
	Point clickPoint;
	
	public ListObject(String name, Color color, String newInput, String newOutput, String newDesc, String newCode){
		this.setText(name);
		this.setBackground(color);
		code = newCode;
		input = newInput;
		output = newOutput;
		desc = newDesc;
	}
	
	public String toString(){
		return ("//" + "NAME: " + getText() + '\n' +
				"//" + "INPUT: " +input + '\n' +
				"//" + "OUTPUT: " + output + '\n' +
				"//" + "DESC: " + desc +  '\n' +
				code + "\n\n");
	}

	@Override
	public void mouseClicked(MouseEvent e) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void mouseEntered(MouseEvent e) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void mouseExited(MouseEvent e) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void mousePressed(MouseEvent e) {
		dragging = true;
		justPressed = true;
		clickPoint = e.getPoint();
	}

	@Override
	public void mouseReleased(MouseEvent e) {
		dragging = false;	
		justPressed = false;
	}
}
